<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="../js/jquery-3.6.0.min.js"></script>
    <script>
        $(function () {
            let num = 0;
            $("#s1").children().each(function () {
                num+=parseInt($(this).text())
            })
            alert(num)
        })

    </script>
</head>
<body>
<div id="s1">
    <font>1</font>
    <span>2</span>
    <div>3</div>
</div>
</body>
</html>